<%--
  Created by IntelliJ IDEA.
  User: 86166
  Date: 2025/9/3
  Time: 10:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>健康系统注册</title>
</head>
<body>
<h2>用户注册</h2>
<form action="RegisterServlet" method="post">
    用户名: <input type="text" name="username" required><br>
    密码: <input type="password" name="password" required><br>
    确认密码: <input type="password" name="confirmPassword" required><br>
    邮箱: <input type="email" name="email" required><br>
    <input type="submit" value="注册">
    <a href="login.jsp">已有账号？立即登录</a>
</form>
<%
    String error = (String) request.getAttribute("error");
    if (error != null) {
%>
<p style="color:red"><%= error %></p>
<%
    }
%>
</body>
</html>
